package com.ming.mobliesafe.dao;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class AntivirusQueryHelper {

	private static String filePath = "data/data/com.ming.mobliesafe/files/antivirus.db";

	public static boolean isVirus(String md5) {
		boolean result = false;
		SQLiteDatabase database = SQLiteDatabase.openDatabase(filePath, null,
				SQLiteDatabase.OPEN_READONLY);
		Cursor cursor = database.rawQuery("select * from datable where md5=?",
				new String[] { md5 });
		while (cursor.moveToNext()) {
			result = true;
		}
		cursor.close();
		database.close();
		return result;
	}
}
